(0) Obligation:

The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1).


The TRS R consists of the following rules:

comp_f_g#1(plus_x(x3), comp_f_g(x1, x2), 0) → plus_x#1(x3, comp_f_g#1(x1, x2, 0))
comp_f_g#1(plus_x(x3), id, 0) → plus_x#1(x3, 0)
map#2(Nil) → Nil
map#2(Cons(x16, x6)) → Cons(plus_x(x16), map#2(x6))
plus_x#1(0, x6) → x6
plus_x#1(S(x8), x10) → S(plus_x#1(x8, x10))
foldr_f#3(Nil, 0) → 0
foldr_f#3(Cons(x16, x5), x24) → comp_f_g#1(x16, foldr#3(x5), x24)
foldr#3(Nil) → id
foldr#3(Cons(x32, x6)) → comp_f_g(x32, foldr#3(x6))
main(x3) → foldr_f#3(map#2(x3), 0)

Rewrite Strategy: INNERMOST

(1) CpxTrsMatchBoundsTAProof (EQUIVALENT transformation)

A linear upper bound on the runtime complexity of the TRS R could be shown with a Match-Bound[TAB_LEFTLINEAR,TAB_NONLEFTLINEAR] (for contructor-based start-terms) of 2.

The compatible tree automaton used to show the Match-Boundedness (for constructor-based start-terms) is represented by:
final states : [1, 2, 3, 4, 5, 6]
transitions:
plus_x0(0) → 0
comp_f_g0(0, 0) → 0
00() → 0
id0() → 0
Nil0() → 0
Cons0(0, 0) → 0
S0(0) → 0
comp_f_g#10(0, 0, 0) → 1
map#20(0) → 2
plus_x#10(0, 0) → 3
foldr_f#30(0, 0) → 4
foldr#30(0) → 5
main0(0) → 6
01() → 8
comp_f_g#11(0, 0, 8) → 7
plus_x#11(0, 7) → 1
01() → 9
plus_x#11(0, 9) → 1
Nil1() → 2
plus_x1(0) → 10
map#21(0) → 11
Cons1(10, 11) → 2
plus_x#11(0, 0) → 12
S1(12) → 3
01() → 4
foldr#31(0) → 13
comp_f_g#11(0, 13, 0) → 4
id1() → 5
foldr#31(0) → 14
comp_f_g1(0, 14) → 5
map#21(0) → 15
01() → 16
foldr_f#31(15, 16) → 6
plus_x#11(0, 7) → 7
plus_x#11(0, 9) → 7
Nil1() → 11
Nil1() → 15
Cons1(10, 11) → 11
Cons1(10, 11) → 15
plus_x#11(0, 7) → 12
S1(12) → 1
plus_x#11(0, 9) → 12
S1(12) → 12
id1() → 13
id1() → 14
comp_f_g1(0, 14) → 13
comp_f_g1(0, 14) → 14
comp_f_g#11(0, 14, 8) → 7
plus_x#11(0, 7) → 4
plus_x#11(0, 9) → 4
S1(12) → 7
02() → 6
foldr#32(11) → 17
comp_f_g#12(10, 17, 16) → 6
id2() → 17
foldr#32(11) → 18
comp_f_g2(10, 18) → 17
id2() → 18
comp_f_g2(10, 18) → 18
02() → 20
comp_f_g#12(10, 18, 20) → 19
plus_x#12(0, 19) → 6
02() → 21
plus_x#12(0, 21) → 6
plus_x#12(0, 19) → 19
plus_x#12(0, 21) → 19
plus_x#11(0, 19) → 12
S1(12) → 6
plus_x#11(0, 21) → 12
S1(12) → 19
0 → 3
0 → 12
7 → 1
7 → 12
7 → 4
9 → 1
9 → 7
19 → 6
19 → 12
21 → 6
21 → 12
21 → 19

(2) BOUNDS(1, n^1)

(3) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)

Converted Cpx (relative) TRS to CDT

(4) Obligation:

Complexity Dependency Tuples Problem
Rules:

comp_f_g#1(plus_x(z0), comp_f_g(z1, z2), 0) → plus_x#1(z0, comp_f_g#1(z1, z2, 0))
comp_f_g#1(plus_x(z0), id, 0) → plus_x#1(z0, 0)
map#2(Nil) → Nil
map#2(Cons(z0, z1)) → Cons(plus_x(z0), map#2(z1))
plus_x#1(0, z0) → z0
plus_x#1(S(z0), z1) → S(plus_x#1(z0, z1))
foldr_f#3(Nil, 0) → 0
foldr_f#3(Cons(z0, z1), z2) → comp_f_g#1(z0, foldr#3(z1), z2)
foldr#3(Nil) → id
foldr#3(Cons(z0, z1)) → comp_f_g(z0, foldr#3(z1))
main(z0) → foldr_f#3(map#2(z0), 0)
Tuples:

COMP_F_G#1(plus_x(z0), comp_f_g(z1, z2), 0) → c(PLUS_X#1(z0, comp_f_g#1(z1, z2, 0)), COMP_F_G#1(z1, z2, 0))
COMP_F_G#1(plus_x(z0), id, 0) → c1(PLUS_X#1(z0, 0))
MAP#2(Nil) → c2
MAP#2(Cons(z0, z1)) → c3(MAP#2(z1))
PLUS_X#1(0, z0) → c4
PLUS_X#1(S(z0), z1) → c5(PLUS_X#1(z0, z1))
FOLDR_F#3(Nil, 0) → c6
FOLDR_F#3(Cons(z0, z1), z2) → c7(COMP_F_G#1(z0, foldr#3(z1), z2), FOLDR#3(z1))
FOLDR#3(Nil) → c8
FOLDR#3(Cons(z0, z1)) → c9(FOLDR#3(z1))
MAIN(z0) → c10(FOLDR_F#3(map#2(z0), 0), MAP#2(z0))
S tuples:

COMP_F_G#1(plus_x(z0), comp_f_g(z1, z2), 0) → c(PLUS_X#1(z0, comp_f_g#1(z1, z2, 0)), COMP_F_G#1(z1, z2, 0))
COMP_F_G#1(plus_x(z0), id, 0) → c1(PLUS_X#1(z0, 0))
MAP#2(Nil) → c2
MAP#2(Cons(z0, z1)) → c3(MAP#2(z1))
PLUS_X#1(0, z0) → c4
PLUS_X#1(S(z0), z1) → c5(PLUS_X#1(z0, z1))
FOLDR_F#3(Nil, 0) → c6
FOLDR_F#3(Cons(z0, z1), z2) → c7(COMP_F_G#1(z0, foldr#3(z1), z2), FOLDR#3(z1))
FOLDR#3(Nil) → c8
FOLDR#3(Cons(z0, z1)) → c9(FOLDR#3(z1))
MAIN(z0) → c10(FOLDR_F#3(map#2(z0), 0), MAP#2(z0))
K tuples:none
Defined Rule Symbols:

comp_f_g#1, map#2, plus_x#1, foldr_f#3, foldr#3, main

Defined Pair Symbols:

COMP_F_G#1, MAP#2, PLUS_X#1, FOLDR_F#3, FOLDR#3, MAIN

Compound Symbols:

c, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10

(5) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID) transformation)

Removed 4 trailing nodes:

FOLDR#3(Nil) → c8
MAP#2(Nil) → c2
PLUS_X#1(0, z0) → c4
FOLDR_F#3(Nil, 0) → c6

(6) Obligation:

Complexity Dependency Tuples Problem
Rules:

comp_f_g#1(plus_x(z0), comp_f_g(z1, z2), 0) → plus_x#1(z0, comp_f_g#1(z1, z2, 0))
comp_f_g#1(plus_x(z0), id, 0) → plus_x#1(z0, 0)
map#2(Nil) → Nil
map#2(Cons(z0, z1)) → Cons(plus_x(z0), map#2(z1))
plus_x#1(0, z0) → z0
plus_x#1(S(z0), z1) → S(plus_x#1(z0, z1))
foldr_f#3(Nil, 0) → 0
foldr_f#3(Cons(z0, z1), z2) → comp_f_g#1(z0, foldr#3(z1), z2)
foldr#3(Nil) → id
foldr#3(Cons(z0, z1)) → comp_f_g(z0, foldr#3(z1))
main(z0) → foldr_f#3(map#2(z0), 0)
Tuples:

COMP_F_G#1(plus_x(z0), comp_f_g(z1, z2), 0) → c(PLUS_X#1(z0, comp_f_g#1(z1, z2, 0)), COMP_F_G#1(z1, z2, 0))
COMP_F_G#1(plus_x(z0), id, 0) → c1(PLUS_X#1(z0, 0))
MAP#2(Cons(z0, z1)) → c3(MAP#2(z1))
PLUS_X#1(S(z0), z1) → c5(PLUS_X#1(z0, z1))
FOLDR_F#3(Cons(z0, z1), z2) → c7(COMP_F_G#1(z0, foldr#3(z1), z2), FOLDR#3(z1))
FOLDR#3(Cons(z0, z1)) → c9(FOLDR#3(z1))
MAIN(z0) → c10(FOLDR_F#3(map#2(z0), 0), MAP#2(z0))
S tuples:

COMP_F_G#1(plus_x(z0), comp_f_g(z1, z2), 0) → c(PLUS_X#1(z0, comp_f_g#1(z1, z2, 0)), COMP_F_G#1(z1, z2, 0))
COMP_F_G#1(plus_x(z0), id, 0) → c1(PLUS_X#1(z0, 0))
MAP#2(Cons(z0, z1)) → c3(MAP#2(z1))
PLUS_X#1(S(z0), z1) → c5(PLUS_X#1(z0, z1))
FOLDR_F#3(Cons(z0, z1), z2) → c7(COMP_F_G#1(z0, foldr#3(z1), z2), FOLDR#3(z1))
FOLDR#3(Cons(z0, z1)) → c9(FOLDR#3(z1))
MAIN(z0) → c10(FOLDR_F#3(map#2(z0), 0), MAP#2(z0))
K tuples:none
Defined Rule Symbols:

comp_f_g#1, map#2, plus_x#1, foldr_f#3, foldr#3, main

Defined Pair Symbols:

COMP_F_G#1, MAP#2, PLUS_X#1, FOLDR_F#3, FOLDR#3, MAIN

Compound Symbols:

c, c1, c3, c5, c7, c9, c10

(7) CdtGraphSplitRhsProof (BOTH BOUNDS(ID, ID) transformation)

Split RHS of tuples not part of any SCC

(8) Obligation:

Complexity Dependency Tuples Problem
Rules:

comp_f_g#1(plus_x(z0), comp_f_g(z1, z2), 0) → plus_x#1(z0, comp_f_g#1(z1, z2, 0))
comp_f_g#1(plus_x(z0), id, 0) → plus_x#1(z0, 0)
map#2(Nil) → Nil
map#2(Cons(z0, z1)) → Cons(plus_x(z0), map#2(z1))
plus_x#1(0, z0) → z0
plus_x#1(S(z0), z1) → S(plus_x#1(z0, z1))
foldr_f#3(Nil, 0) → 0
foldr_f#3(Cons(z0, z1), z2) → comp_f_g#1(z0, foldr#3(z1), z2)
foldr#3(Nil) → id
foldr#3(Cons(z0, z1)) → comp_f_g(z0, foldr#3(z1))
main(z0) → foldr_f#3(map#2(z0), 0)
Tuples:

COMP_F_G#1(plus_x(z0), comp_f_g(z1, z2), 0) → c(PLUS_X#1(z0, comp_f_g#1(z1, z2, 0)), COMP_F_G#1(z1, z2, 0))
COMP_F_G#1(plus_x(z0), id, 0) → c1(PLUS_X#1(z0, 0))
MAP#2(Cons(z0, z1)) → c3(MAP#2(z1))
PLUS_X#1(S(z0), z1) → c5(PLUS_X#1(z0, z1))
FOLDR#3(Cons(z0, z1)) → c9(FOLDR#3(z1))
FOLDR_F#3(Cons(z0, z1), z2) → c2(COMP_F_G#1(z0, foldr#3(z1), z2))
FOLDR_F#3(Cons(z0, z1), z2) → c2(FOLDR#3(z1))
MAIN(z0) → c2(FOLDR_F#3(map#2(z0), 0))
MAIN(z0) → c2(MAP#2(z0))
S tuples:

COMP_F_G#1(plus_x(z0), comp_f_g(z1, z2), 0) → c(PLUS_X#1(z0, comp_f_g#1(z1, z2, 0)), COMP_F_G#1(z1, z2, 0))
COMP_F_G#1(plus_x(z0), id, 0) → c1(PLUS_X#1(z0, 0))
MAP#2(Cons(z0, z1)) → c3(MAP#2(z1))
PLUS_X#1(S(z0), z1) → c5(PLUS_X#1(z0, z1))
FOLDR#3(Cons(z0, z1)) → c9(FOLDR#3(z1))
FOLDR_F#3(Cons(z0, z1), z2) → c2(COMP_F_G#1(z0, foldr#3(z1), z2))
FOLDR_F#3(Cons(z0, z1), z2) → c2(FOLDR#3(z1))
MAIN(z0) → c2(FOLDR_F#3(map#2(z0), 0))
MAIN(z0) → c2(MAP#2(z0))
K tuples:none
Defined Rule Symbols:

comp_f_g#1, map#2, plus_x#1, foldr_f#3, foldr#3, main

Defined Pair Symbols:

COMP_F_G#1, MAP#2, PLUS_X#1, FOLDR#3, FOLDR_F#3, MAIN

Compound Symbols:

c, c1, c3, c5, c9, c2

(9) CdtLeafRemovalProof (ComplexityIfPolyImplication transformation)

Removed 1 leading nodes:

MAIN(z0) → c2(MAP#2(z0))

(10) Obligation:

Complexity Dependency Tuples Problem
Rules:

comp_f_g#1(plus_x(z0), comp_f_g(z1, z2), 0) → plus_x#1(z0, comp_f_g#1(z1, z2, 0))
comp_f_g#1(plus_x(z0), id, 0) → plus_x#1(z0, 0)
map#2(Nil) → Nil
map#2(Cons(z0, z1)) → Cons(plus_x(z0), map#2(z1))
plus_x#1(0, z0) → z0
plus_x#1(S(z0), z1) → S(plus_x#1(z0, z1))
foldr_f#3(Nil, 0) → 0
foldr_f#3(Cons(z0, z1), z2) → comp_f_g#1(z0, foldr#3(z1), z2)
foldr#3(Nil) → id
foldr#3(Cons(z0, z1)) → comp_f_g(z0, foldr#3(z1))
main(z0) → foldr_f#3(map#2(z0), 0)
Tuples:

COMP_F_G#1(plus_x(z0), comp_f_g(z1, z2), 0) → c(PLUS_X#1(z0, comp_f_g#1(z1, z2, 0)), COMP_F_G#1(z1, z2, 0))
COMP_F_G#1(plus_x(z0), id, 0) → c1(PLUS_X#1(z0, 0))
MAP#2(Cons(z0, z1)) → c3(MAP#2(z1))
PLUS_X#1(S(z0), z1) → c5(PLUS_X#1(z0, z1))
FOLDR#3(Cons(z0, z1)) → c9(FOLDR#3(z1))
FOLDR_F#3(Cons(z0, z1), z2) → c2(COMP_F_G#1(z0, foldr#3(z1), z2))
FOLDR_F#3(Cons(z0, z1), z2) → c2(FOLDR#3(z1))
MAIN(z0) → c2(FOLDR_F#3(map#2(z0), 0))
S tuples:

COMP_F_G#1(plus_x(z0), comp_f_g(z1, z2), 0) → c(PLUS_X#1(z0, comp_f_g#1(z1, z2, 0)), COMP_F_G#1(z1, z2, 0))
COMP_F_G#1(plus_x(z0), id, 0) → c1(PLUS_X#1(z0, 0))
MAP#2(Cons(z0, z1)) → c3(MAP#2(z1))
PLUS_X#1(S(z0), z1) → c5(PLUS_X#1(z0, z1))
FOLDR#3(Cons(z0, z1)) → c9(FOLDR#3(z1))
FOLDR_F#3(Cons(z0, z1), z2) → c2(COMP_F_G#1(z0, foldr#3(z1), z2))
FOLDR_F#3(Cons(z0, z1), z2) → c2(FOLDR#3(z1))
MAIN(z0) → c2(FOLDR_F#3(map#2(z0), 0))
K tuples:none
Defined Rule Symbols:

comp_f_g#1, map#2, plus_x#1, foldr_f#3, foldr#3, main

Defined Pair Symbols:

COMP_F_G#1, MAP#2, PLUS_X#1, FOLDR#3, FOLDR_F#3, MAIN

Compound Symbols:

c, c1, c3, c5, c9, c2

(11) CdtKnowledgeProof (BOTH BOUNDS(ID, ID) transformation)

The following tuples could be moved from S to K by knowledge propagation:

MAIN(z0) → c2(FOLDR_F#3(map#2(z0), 0))
FOLDR_F#3(Cons(z0, z1), z2) → c2(COMP_F_G#1(z0, foldr#3(z1), z2))
FOLDR_F#3(Cons(z0, z1), z2) → c2(FOLDR#3(z1))

(12) Obligation:

Complexity Dependency Tuples Problem
Rules:

comp_f_g#1(plus_x(z0), comp_f_g(z1, z2), 0) → plus_x#1(z0, comp_f_g#1(z1, z2, 0))
comp_f_g#1(plus_x(z0), id, 0) → plus_x#1(z0, 0)
map#2(Nil) → Nil
map#2(Cons(z0, z1)) → Cons(plus_x(z0), map#2(z1))
plus_x#1(0, z0) → z0
plus_x#1(S(z0), z1) → S(plus_x#1(z0, z1))
foldr_f#3(Nil, 0) → 0
foldr_f#3(Cons(z0, z1), z2) → comp_f_g#1(z0, foldr#3(z1), z2)
foldr#3(Nil) → id
foldr#3(Cons(z0, z1)) → comp_f_g(z0, foldr#3(z1))
main(z0) → foldr_f#3(map#2(z0), 0)
Tuples:

COMP_F_G#1(plus_x(z0), comp_f_g(z1, z2), 0) → c(PLUS_X#1(z0, comp_f_g#1(z1, z2, 0)), COMP_F_G#1(z1, z2, 0))
COMP_F_G#1(plus_x(z0), id, 0) → c1(PLUS_X#1(z0, 0))
MAP#2(Cons(z0, z1)) → c3(MAP#2(z1))
PLUS_X#1(S(z0), z1) → c5(PLUS_X#1(z0, z1))
FOLDR#3(Cons(z0, z1)) → c9(FOLDR#3(z1))
FOLDR_F#3(Cons(z0, z1), z2) → c2(COMP_F_G#1(z0, foldr#3(z1), z2))
FOLDR_F#3(Cons(z0, z1), z2) → c2(FOLDR#3(z1))
MAIN(z0) → c2(FOLDR_F#3(map#2(z0), 0))
S tuples:

COMP_F_G#1(plus_x(z0), comp_f_g(z1, z2), 0) → c(PLUS_X#1(z0, comp_f_g#1(z1, z2, 0)), COMP_F_G#1(z1, z2, 0))
COMP_F_G#1(plus_x(z0), id, 0) → c1(PLUS_X#1(z0, 0))
MAP#2(Cons(z0, z1)) → c3(MAP#2(z1))
PLUS_X#1(S(z0), z1) → c5(PLUS_X#1(z0, z1))
FOLDR#3(Cons(z0, z1)) → c9(FOLDR#3(z1))
K tuples:

MAIN(z0) → c2(FOLDR_F#3(map#2(z0), 0))
FOLDR_F#3(Cons(z0, z1), z2) → c2(COMP_F_G#1(z0, foldr#3(z1), z2))
FOLDR_F#3(Cons(z0, z1), z2) → c2(FOLDR#3(z1))
Defined Rule Symbols:

comp_f_g#1, map#2, plus_x#1, foldr_f#3, foldr#3, main

Defined Pair Symbols:

COMP_F_G#1, MAP#2, PLUS_X#1, FOLDR#3, FOLDR_F#3, MAIN

Compound Symbols:

c, c1, c3, c5, c9, c2

(13) CdtUsableRulesProof (EQUIVALENT transformation)

The following rules are not usable and were removed:

foldr_f#3(Nil, 0) → 0
foldr_f#3(Cons(z0, z1), z2) → comp_f_g#1(z0, foldr#3(z1), z2)
main(z0) → foldr_f#3(map#2(z0), 0)

(14) Obligation:

Complexity Dependency Tuples Problem
Rules:

comp_f_g#1(plus_x(z0), comp_f_g(z1, z2), 0) → plus_x#1(z0, comp_f_g#1(z1, z2, 0))
comp_f_g#1(plus_x(z0), id, 0) → plus_x#1(z0, 0)
plus_x#1(0, z0) → z0
plus_x#1(S(z0), z1) → S(plus_x#1(z0, z1))
foldr#3(Nil) → id
foldr#3(Cons(z0, z1)) → comp_f_g(z0, foldr#3(z1))
map#2(Nil) → Nil
map#2(Cons(z0, z1)) → Cons(plus_x(z0), map#2(z1))
Tuples:

COMP_F_G#1(plus_x(z0), comp_f_g(z1, z2), 0) → c(PLUS_X#1(z0, comp_f_g#1(z1, z2, 0)), COMP_F_G#1(z1, z2, 0))
COMP_F_G#1(plus_x(z0), id, 0) → c1(PLUS_X#1(z0, 0))
MAP#2(Cons(z0, z1)) → c3(MAP#2(z1))
PLUS_X#1(S(z0), z1) → c5(PLUS_X#1(z0, z1))
FOLDR#3(Cons(z0, z1)) → c9(FOLDR#3(z1))
FOLDR_F#3(Cons(z0, z1), z2) → c2(COMP_F_G#1(z0, foldr#3(z1), z2))
FOLDR_F#3(Cons(z0, z1), z2) → c2(FOLDR#3(z1))
MAIN(z0) → c2(FOLDR_F#3(map#2(z0), 0))
S tuples:

COMP_F_G#1(plus_x(z0), comp_f_g(z1, z2), 0) → c(PLUS_X#1(z0, comp_f_g#1(z1, z2, 0)), COMP_F_G#1(z1, z2, 0))
COMP_F_G#1(plus_x(z0), id, 0) → c1(PLUS_X#1(z0, 0))
MAP#2(Cons(z0, z1)) → c3(MAP#2(z1))
PLUS_X#1(S(z0), z1) → c5(PLUS_X#1(z0, z1))
FOLDR#3(Cons(z0, z1)) → c9(FOLDR#3(z1))
K tuples:

MAIN(z0) → c2(FOLDR_F#3(map#2(z0), 0))
FOLDR_F#3(Cons(z0, z1), z2) → c2(COMP_F_G#1(z0, foldr#3(z1), z2))
FOLDR_F#3(Cons(z0, z1), z2) → c2(FOLDR#3(z1))
Defined Rule Symbols:

comp_f_g#1, plus_x#1, foldr#3, map#2

Defined Pair Symbols:

COMP_F_G#1, MAP#2, PLUS_X#1, FOLDR#3, FOLDR_F#3, MAIN

Compound Symbols:

c, c1, c3, c5, c9, c2

(15) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1)) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

COMP_F_G#1(plus_x(z0), id, 0) → c1(PLUS_X#1(z0, 0))
We considered the (Usable) Rules:none
And the Tuples:

COMP_F_G#1(plus_x(z0), comp_f_g(z1, z2), 0) → c(PLUS_X#1(z0, comp_f_g#1(z1, z2, 0)), COMP_F_G#1(z1, z2, 0))
COMP_F_G#1(plus_x(z0), id, 0) → c1(PLUS_X#1(z0, 0))
MAP#2(Cons(z0, z1)) → c3(MAP#2(z1))
PLUS_X#1(S(z0), z1) → c5(PLUS_X#1(z0, z1))
FOLDR#3(Cons(z0, z1)) → c9(FOLDR#3(z1))
FOLDR_F#3(Cons(z0, z1), z2) → c2(COMP_F_G#1(z0, foldr#3(z1), z2))
FOLDR_F#3(Cons(z0, z1), z2) → c2(FOLDR#3(z1))
MAIN(z0) → c2(FOLDR_F#3(map#2(z0), 0))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0   
POL(COMP_F_G#1(x1, x2, x3)) = [1]   
POL(Cons(x1, x2)) = [1] + x1   
POL(FOLDR#3(x1)) = [1]   
POL(FOLDR_F#3(x1, x2)) = [1] + x2   
POL(MAIN(x1)) = [1]   
POL(MAP#2(x1)) = 0   
POL(Nil) = 0   
POL(PLUS_X#1(x1, x2)) = 0   
POL(S(x1)) = 0   
POL(c(x1, x2)) = x1 + x2   
POL(c1(x1)) = x1   
POL(c2(x1)) = x1   
POL(c3(x1)) = x1   
POL(c5(x1)) = x1   
POL(c9(x1)) = x1   
POL(comp_f_g(x1, x2)) = [1]   
POL(comp_f_g#1(x1, x2, x3)) = 0   
POL(foldr#3(x1)) = [1] + x1   
POL(id) = 0   
POL(map#2(x1)) = [1] + x1   
POL(plus_x(x1)) = 0   
POL(plus_x#1(x1, x2)) = 0   

(16) Obligation:

Complexity Dependency Tuples Problem
Rules:

comp_f_g#1(plus_x(z0), comp_f_g(z1, z2), 0) → plus_x#1(z0, comp_f_g#1(z1, z2, 0))
comp_f_g#1(plus_x(z0), id, 0) → plus_x#1(z0, 0)
plus_x#1(0, z0) → z0
plus_x#1(S(z0), z1) → S(plus_x#1(z0, z1))
foldr#3(Nil) → id
foldr#3(Cons(z0, z1)) → comp_f_g(z0, foldr#3(z1))
map#2(Nil) → Nil
map#2(Cons(z0, z1)) → Cons(plus_x(z0), map#2(z1))
Tuples:

COMP_F_G#1(plus_x(z0), comp_f_g(z1, z2), 0) → c(PLUS_X#1(z0, comp_f_g#1(z1, z2, 0)), COMP_F_G#1(z1, z2, 0))
COMP_F_G#1(plus_x(z0), id, 0) → c1(PLUS_X#1(z0, 0))
MAP#2(Cons(z0, z1)) → c3(MAP#2(z1))
PLUS_X#1(S(z0), z1) → c5(PLUS_X#1(z0, z1))
FOLDR#3(Cons(z0, z1)) → c9(FOLDR#3(z1))
FOLDR_F#3(Cons(z0, z1), z2) → c2(COMP_F_G#1(z0, foldr#3(z1), z2))
FOLDR_F#3(Cons(z0, z1), z2) → c2(FOLDR#3(z1))
MAIN(z0) → c2(FOLDR_F#3(map#2(z0), 0))
S tuples:

COMP_F_G#1(plus_x(z0), comp_f_g(z1, z2), 0) → c(PLUS_X#1(z0, comp_f_g#1(z1, z2, 0)), COMP_F_G#1(z1, z2, 0))
MAP#2(Cons(z0, z1)) → c3(MAP#2(z1))
PLUS_X#1(S(z0), z1) → c5(PLUS_X#1(z0, z1))
FOLDR#3(Cons(z0, z1)) → c9(FOLDR#3(z1))
K tuples:

MAIN(z0) → c2(FOLDR_F#3(map#2(z0), 0))
FOLDR_F#3(Cons(z0, z1), z2) → c2(COMP_F_G#1(z0, foldr#3(z1), z2))
FOLDR_F#3(Cons(z0, z1), z2) → c2(FOLDR#3(z1))
COMP_F_G#1(plus_x(z0), id, 0) → c1(PLUS_X#1(z0, 0))
Defined Rule Symbols:

comp_f_g#1, plus_x#1, foldr#3, map#2

Defined Pair Symbols:

COMP_F_G#1, MAP#2, PLUS_X#1, FOLDR#3, FOLDR_F#3, MAIN

Compound Symbols:

c, c1, c3, c5, c9, c2

(17) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1)) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

MAP#2(Cons(z0, z1)) → c3(MAP#2(z1))
We considered the (Usable) Rules:none
And the Tuples:

COMP_F_G#1(plus_x(z0), comp_f_g(z1, z2), 0) → c(PLUS_X#1(z0, comp_f_g#1(z1, z2, 0)), COMP_F_G#1(z1, z2, 0))
COMP_F_G#1(plus_x(z0), id, 0) → c1(PLUS_X#1(z0, 0))
MAP#2(Cons(z0, z1)) → c3(MAP#2(z1))
PLUS_X#1(S(z0), z1) → c5(PLUS_X#1(z0, z1))
FOLDR#3(Cons(z0, z1)) → c9(FOLDR#3(z1))
FOLDR_F#3(Cons(z0, z1), z2) → c2(COMP_F_G#1(z0, foldr#3(z1), z2))
FOLDR_F#3(Cons(z0, z1), z2) → c2(FOLDR#3(z1))
MAIN(z0) → c2(FOLDR_F#3(map#2(z0), 0))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = [1]   
POL(COMP_F_G#1(x1, x2, x3)) = x3   
POL(Cons(x1, x2)) = [1] + x2   
POL(FOLDR#3(x1)) = 0   
POL(FOLDR_F#3(x1, x2)) = x2   
POL(MAIN(x1)) = [1] + x1   
POL(MAP#2(x1)) = x1   
POL(Nil) = [1]   
POL(PLUS_X#1(x1, x2)) = 0   
POL(S(x1)) = 0   
POL(c(x1, x2)) = x1 + x2   
POL(c1(x1)) = x1   
POL(c2(x1)) = x1   
POL(c3(x1)) = x1   
POL(c5(x1)) = x1   
POL(c9(x1)) = x1   
POL(comp_f_g(x1, x2)) = 0   
POL(comp_f_g#1(x1, x2, x3)) = 0   
POL(foldr#3(x1)) = 0   
POL(id) = 0   
POL(map#2(x1)) = [1] + x1   
POL(plus_x(x1)) = 0   
POL(plus_x#1(x1, x2)) = 0   

(18) Obligation:

Complexity Dependency Tuples Problem
Rules:

comp_f_g#1(plus_x(z0), comp_f_g(z1, z2), 0) → plus_x#1(z0, comp_f_g#1(z1, z2, 0))
comp_f_g#1(plus_x(z0), id, 0) → plus_x#1(z0, 0)
plus_x#1(0, z0) → z0
plus_x#1(S(z0), z1) → S(plus_x#1(z0, z1))
foldr#3(Nil) → id
foldr#3(Cons(z0, z1)) → comp_f_g(z0, foldr#3(z1))
map#2(Nil) → Nil
map#2(Cons(z0, z1)) → Cons(plus_x(z0), map#2(z1))
Tuples:

COMP_F_G#1(plus_x(z0), comp_f_g(z1, z2), 0) → c(PLUS_X#1(z0, comp_f_g#1(z1, z2, 0)), COMP_F_G#1(z1, z2, 0))
COMP_F_G#1(plus_x(z0), id, 0) → c1(PLUS_X#1(z0, 0))
MAP#2(Cons(z0, z1)) → c3(MAP#2(z1))
PLUS_X#1(S(z0), z1) → c5(PLUS_X#1(z0, z1))
FOLDR#3(Cons(z0, z1)) → c9(FOLDR#3(z1))
FOLDR_F#3(Cons(z0, z1), z2) → c2(COMP_F_G#1(z0, foldr#3(z1), z2))
FOLDR_F#3(Cons(z0, z1), z2) → c2(FOLDR#3(z1))
MAIN(z0) → c2(FOLDR_F#3(map#2(z0), 0))
S tuples:

COMP_F_G#1(plus_x(z0), comp_f_g(z1, z2), 0) → c(PLUS_X#1(z0, comp_f_g#1(z1, z2, 0)), COMP_F_G#1(z1, z2, 0))
PLUS_X#1(S(z0), z1) → c5(PLUS_X#1(z0, z1))
FOLDR#3(Cons(z0, z1)) → c9(FOLDR#3(z1))
K tuples:

MAIN(z0) → c2(FOLDR_F#3(map#2(z0), 0))
FOLDR_F#3(Cons(z0, z1), z2) → c2(COMP_F_G#1(z0, foldr#3(z1), z2))
FOLDR_F#3(Cons(z0, z1), z2) → c2(FOLDR#3(z1))
COMP_F_G#1(plus_x(z0), id, 0) → c1(PLUS_X#1(z0, 0))
MAP#2(Cons(z0, z1)) → c3(MAP#2(z1))
Defined Rule Symbols:

comp_f_g#1, plus_x#1, foldr#3, map#2

Defined Pair Symbols:

COMP_F_G#1, MAP#2, PLUS_X#1, FOLDR#3, FOLDR_F#3, MAIN

Compound Symbols:

c, c1, c3, c5, c9, c2

(19) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1)) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

FOLDR#3(Cons(z0, z1)) → c9(FOLDR#3(z1))
We considered the (Usable) Rules:

map#2(Nil) → Nil
map#2(Cons(z0, z1)) → Cons(plus_x(z0), map#2(z1))
And the Tuples:

COMP_F_G#1(plus_x(z0), comp_f_g(z1, z2), 0) → c(PLUS_X#1(z0, comp_f_g#1(z1, z2, 0)), COMP_F_G#1(z1, z2, 0))
COMP_F_G#1(plus_x(z0), id, 0) → c1(PLUS_X#1(z0, 0))
MAP#2(Cons(z0, z1)) → c3(MAP#2(z1))
PLUS_X#1(S(z0), z1) → c5(PLUS_X#1(z0, z1))
FOLDR#3(Cons(z0, z1)) → c9(FOLDR#3(z1))
FOLDR_F#3(Cons(z0, z1), z2) → c2(COMP_F_G#1(z0, foldr#3(z1), z2))
FOLDR_F#3(Cons(z0, z1), z2) → c2(FOLDR#3(z1))
MAIN(z0) → c2(FOLDR_F#3(map#2(z0), 0))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0   
POL(COMP_F_G#1(x1, x2, x3)) = 0   
POL(Cons(x1, x2)) = [1] + x2   
POL(FOLDR#3(x1)) = x1   
POL(FOLDR_F#3(x1, x2)) = x1 + x2   
POL(MAIN(x1)) = [1] + x1   
POL(MAP#2(x1)) = 0   
POL(Nil) = 0   
POL(PLUS_X#1(x1, x2)) = 0   
POL(S(x1)) = 0   
POL(c(x1, x2)) = x1 + x2   
POL(c1(x1)) = x1   
POL(c2(x1)) = x1   
POL(c3(x1)) = x1   
POL(c5(x1)) = x1   
POL(c9(x1)) = x1   
POL(comp_f_g(x1, x2)) = 0   
POL(comp_f_g#1(x1, x2, x3)) = 0   
POL(foldr#3(x1)) = 0   
POL(id) = 0   
POL(map#2(x1)) = [1] + x1   
POL(plus_x(x1)) = 0   
POL(plus_x#1(x1, x2)) = 0   

(20) Obligation:

Complexity Dependency Tuples Problem
Rules:

comp_f_g#1(plus_x(z0), comp_f_g(z1, z2), 0) → plus_x#1(z0, comp_f_g#1(z1, z2, 0))
comp_f_g#1(plus_x(z0), id, 0) → plus_x#1(z0, 0)
plus_x#1(0, z0) → z0
plus_x#1(S(z0), z1) → S(plus_x#1(z0, z1))
foldr#3(Nil) → id
foldr#3(Cons(z0, z1)) → comp_f_g(z0, foldr#3(z1))
map#2(Nil) → Nil
map#2(Cons(z0, z1)) → Cons(plus_x(z0), map#2(z1))
Tuples:

COMP_F_G#1(plus_x(z0), comp_f_g(z1, z2), 0) → c(PLUS_X#1(z0, comp_f_g#1(z1, z2, 0)), COMP_F_G#1(z1, z2, 0))
COMP_F_G#1(plus_x(z0), id, 0) → c1(PLUS_X#1(z0, 0))
MAP#2(Cons(z0, z1)) → c3(MAP#2(z1))
PLUS_X#1(S(z0), z1) → c5(PLUS_X#1(z0, z1))
FOLDR#3(Cons(z0, z1)) → c9(FOLDR#3(z1))
FOLDR_F#3(Cons(z0, z1), z2) → c2(COMP_F_G#1(z0, foldr#3(z1), z2))
FOLDR_F#3(Cons(z0, z1), z2) → c2(FOLDR#3(z1))
MAIN(z0) → c2(FOLDR_F#3(map#2(z0), 0))
S tuples:

COMP_F_G#1(plus_x(z0), comp_f_g(z1, z2), 0) → c(PLUS_X#1(z0, comp_f_g#1(z1, z2, 0)), COMP_F_G#1(z1, z2, 0))
PLUS_X#1(S(z0), z1) → c5(PLUS_X#1(z0, z1))
K tuples:

MAIN(z0) → c2(FOLDR_F#3(map#2(z0), 0))
FOLDR_F#3(Cons(z0, z1), z2) → c2(COMP_F_G#1(z0, foldr#3(z1), z2))
FOLDR_F#3(Cons(z0, z1), z2) → c2(FOLDR#3(z1))
COMP_F_G#1(plus_x(z0), id, 0) → c1(PLUS_X#1(z0, 0))
MAP#2(Cons(z0, z1)) → c3(MAP#2(z1))
FOLDR#3(Cons(z0, z1)) → c9(FOLDR#3(z1))
Defined Rule Symbols:

comp_f_g#1, plus_x#1, foldr#3, map#2

Defined Pair Symbols:

COMP_F_G#1, MAP#2, PLUS_X#1, FOLDR#3, FOLDR_F#3, MAIN

Compound Symbols:

c, c1, c3, c5, c9, c2

(21) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1)) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

PLUS_X#1(S(z0), z1) → c5(PLUS_X#1(z0, z1))
We considered the (Usable) Rules:

foldr#3(Cons(z0, z1)) → comp_f_g(z0, foldr#3(z1))
map#2(Nil) → Nil
foldr#3(Nil) → id
map#2(Cons(z0, z1)) → Cons(plus_x(z0), map#2(z1))
And the Tuples:

COMP_F_G#1(plus_x(z0), comp_f_g(z1, z2), 0) → c(PLUS_X#1(z0, comp_f_g#1(z1, z2, 0)), COMP_F_G#1(z1, z2, 0))
COMP_F_G#1(plus_x(z0), id, 0) → c1(PLUS_X#1(z0, 0))
MAP#2(Cons(z0, z1)) → c3(MAP#2(z1))
PLUS_X#1(S(z0), z1) → c5(PLUS_X#1(z0, z1))
FOLDR#3(Cons(z0, z1)) → c9(FOLDR#3(z1))
FOLDR_F#3(Cons(z0, z1), z2) → c2(COMP_F_G#1(z0, foldr#3(z1), z2))
FOLDR_F#3(Cons(z0, z1), z2) → c2(FOLDR#3(z1))
MAIN(z0) → c2(FOLDR_F#3(map#2(z0), 0))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0   
POL(COMP_F_G#1(x1, x2, x3)) = x1 + x2   
POL(Cons(x1, x2)) = x1 + x2   
POL(FOLDR#3(x1)) = 0   
POL(FOLDR_F#3(x1, x2)) = x1   
POL(MAIN(x1)) = [1] + x1   
POL(MAP#2(x1)) = 0   
POL(Nil) = 0   
POL(PLUS_X#1(x1, x2)) = x1   
POL(S(x1)) = [1] + x1   
POL(c(x1, x2)) = x1 + x2   
POL(c1(x1)) = x1   
POL(c2(x1)) = x1   
POL(c3(x1)) = x1   
POL(c5(x1)) = x1   
POL(c9(x1)) = x1   
POL(comp_f_g(x1, x2)) = x1 + x2   
POL(comp_f_g#1(x1, x2, x3)) = 0   
POL(foldr#3(x1)) = x1   
POL(id) = 0   
POL(map#2(x1)) = x1   
POL(plus_x(x1)) = x1   
POL(plus_x#1(x1, x2)) = 0   

(22) Obligation:

Complexity Dependency Tuples Problem
Rules:

comp_f_g#1(plus_x(z0), comp_f_g(z1, z2), 0) → plus_x#1(z0, comp_f_g#1(z1, z2, 0))
comp_f_g#1(plus_x(z0), id, 0) → plus_x#1(z0, 0)
plus_x#1(0, z0) → z0
plus_x#1(S(z0), z1) → S(plus_x#1(z0, z1))
foldr#3(Nil) → id
foldr#3(Cons(z0, z1)) → comp_f_g(z0, foldr#3(z1))
map#2(Nil) → Nil
map#2(Cons(z0, z1)) → Cons(plus_x(z0), map#2(z1))
Tuples:

COMP_F_G#1(plus_x(z0), comp_f_g(z1, z2), 0) → c(PLUS_X#1(z0, comp_f_g#1(z1, z2, 0)), COMP_F_G#1(z1, z2, 0))
COMP_F_G#1(plus_x(z0), id, 0) → c1(PLUS_X#1(z0, 0))
MAP#2(Cons(z0, z1)) → c3(MAP#2(z1))
PLUS_X#1(S(z0), z1) → c5(PLUS_X#1(z0, z1))
FOLDR#3(Cons(z0, z1)) → c9(FOLDR#3(z1))
FOLDR_F#3(Cons(z0, z1), z2) → c2(COMP_F_G#1(z0, foldr#3(z1), z2))
FOLDR_F#3(Cons(z0, z1), z2) → c2(FOLDR#3(z1))
MAIN(z0) → c2(FOLDR_F#3(map#2(z0), 0))
S tuples:

COMP_F_G#1(plus_x(z0), comp_f_g(z1, z2), 0) → c(PLUS_X#1(z0, comp_f_g#1(z1, z2, 0)), COMP_F_G#1(z1, z2, 0))
K tuples:

MAIN(z0) → c2(FOLDR_F#3(map#2(z0), 0))
FOLDR_F#3(Cons(z0, z1), z2) → c2(COMP_F_G#1(z0, foldr#3(z1), z2))
FOLDR_F#3(Cons(z0, z1), z2) → c2(FOLDR#3(z1))
COMP_F_G#1(plus_x(z0), id, 0) → c1(PLUS_X#1(z0, 0))
MAP#2(Cons(z0, z1)) → c3(MAP#2(z1))
FOLDR#3(Cons(z0, z1)) → c9(FOLDR#3(z1))
PLUS_X#1(S(z0), z1) → c5(PLUS_X#1(z0, z1))
Defined Rule Symbols:

comp_f_g#1, plus_x#1, foldr#3, map#2

Defined Pair Symbols:

COMP_F_G#1, MAP#2, PLUS_X#1, FOLDR#3, FOLDR_F#3, MAIN

Compound Symbols:

c, c1, c3, c5, c9, c2

(23) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1)) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

COMP_F_G#1(plus_x(z0), comp_f_g(z1, z2), 0) → c(PLUS_X#1(z0, comp_f_g#1(z1, z2, 0)), COMP_F_G#1(z1, z2, 0))
We considered the (Usable) Rules:

foldr#3(Cons(z0, z1)) → comp_f_g(z0, foldr#3(z1))
map#2(Nil) → Nil
foldr#3(Nil) → id
map#2(Cons(z0, z1)) → Cons(plus_x(z0), map#2(z1))
And the Tuples:

COMP_F_G#1(plus_x(z0), comp_f_g(z1, z2), 0) → c(PLUS_X#1(z0, comp_f_g#1(z1, z2, 0)), COMP_F_G#1(z1, z2, 0))
COMP_F_G#1(plus_x(z0), id, 0) → c1(PLUS_X#1(z0, 0))
MAP#2(Cons(z0, z1)) → c3(MAP#2(z1))
PLUS_X#1(S(z0), z1) → c5(PLUS_X#1(z0, z1))
FOLDR#3(Cons(z0, z1)) → c9(FOLDR#3(z1))
FOLDR_F#3(Cons(z0, z1), z2) → c2(COMP_F_G#1(z0, foldr#3(z1), z2))
FOLDR_F#3(Cons(z0, z1), z2) → c2(FOLDR#3(z1))
MAIN(z0) → c2(FOLDR_F#3(map#2(z0), 0))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0   
POL(COMP_F_G#1(x1, x2, x3)) = x2   
POL(Cons(x1, x2)) = [1] + x1 + x2   
POL(FOLDR#3(x1)) = [1]   
POL(FOLDR_F#3(x1, x2)) = [1] + x1 + x2   
POL(MAIN(x1)) = [1] + x1   
POL(MAP#2(x1)) = 0   
POL(Nil) = 0   
POL(PLUS_X#1(x1, x2)) = 0   
POL(S(x1)) = 0   
POL(c(x1, x2)) = x1 + x2   
POL(c1(x1)) = x1   
POL(c2(x1)) = x1   
POL(c3(x1)) = x1   
POL(c5(x1)) = x1   
POL(c9(x1)) = x1   
POL(comp_f_g(x1, x2)) = [1] + x1 + x2   
POL(comp_f_g#1(x1, x2, x3)) = 0   
POL(foldr#3(x1)) = x1   
POL(id) = 0   
POL(map#2(x1)) = x1   
POL(plus_x(x1)) = x1   
POL(plus_x#1(x1, x2)) = 0   

(24) Obligation:

Complexity Dependency Tuples Problem
Rules:

comp_f_g#1(plus_x(z0), comp_f_g(z1, z2), 0) → plus_x#1(z0, comp_f_g#1(z1, z2, 0))
comp_f_g#1(plus_x(z0), id, 0) → plus_x#1(z0, 0)
plus_x#1(0, z0) → z0
plus_x#1(S(z0), z1) → S(plus_x#1(z0, z1))
foldr#3(Nil) → id
foldr#3(Cons(z0, z1)) → comp_f_g(z0, foldr#3(z1))
map#2(Nil) → Nil
map#2(Cons(z0, z1)) → Cons(plus_x(z0), map#2(z1))
Tuples:

COMP_F_G#1(plus_x(z0), comp_f_g(z1, z2), 0) → c(PLUS_X#1(z0, comp_f_g#1(z1, z2, 0)), COMP_F_G#1(z1, z2, 0))
COMP_F_G#1(plus_x(z0), id, 0) → c1(PLUS_X#1(z0, 0))
MAP#2(Cons(z0, z1)) → c3(MAP#2(z1))
PLUS_X#1(S(z0), z1) → c5(PLUS_X#1(z0, z1))
FOLDR#3(Cons(z0, z1)) → c9(FOLDR#3(z1))
FOLDR_F#3(Cons(z0, z1), z2) → c2(COMP_F_G#1(z0, foldr#3(z1), z2))
FOLDR_F#3(Cons(z0, z1), z2) → c2(FOLDR#3(z1))
MAIN(z0) → c2(FOLDR_F#3(map#2(z0), 0))
S tuples:none
K tuples:

MAIN(z0) → c2(FOLDR_F#3(map#2(z0), 0))
FOLDR_F#3(Cons(z0, z1), z2) → c2(COMP_F_G#1(z0, foldr#3(z1), z2))
FOLDR_F#3(Cons(z0, z1), z2) → c2(FOLDR#3(z1))
COMP_F_G#1(plus_x(z0), id, 0) → c1(PLUS_X#1(z0, 0))
MAP#2(Cons(z0, z1)) → c3(MAP#2(z1))
FOLDR#3(Cons(z0, z1)) → c9(FOLDR#3(z1))
PLUS_X#1(S(z0), z1) → c5(PLUS_X#1(z0, z1))
COMP_F_G#1(plus_x(z0), comp_f_g(z1, z2), 0) → c(PLUS_X#1(z0, comp_f_g#1(z1, z2, 0)), COMP_F_G#1(z1, z2, 0))
Defined Rule Symbols:

comp_f_g#1, plus_x#1, foldr#3, map#2

Defined Pair Symbols:

COMP_F_G#1, MAP#2, PLUS_X#1, FOLDR#3, FOLDR_F#3, MAIN

Compound Symbols:

c, c1, c3, c5, c9, c2

(25) SIsEmptyProof (BOTH BOUNDS(ID, ID) transformation)

The set S is empty

(26) BOUNDS(1, 1)